#ifndef OCAMERA_H
#define OCAMERA_H

#include "basicoject.h"
#include <OgreCamera.h>

class OCamera : public BasicObject {
    Q_OBJECT

    Q_PROPERTY(float xPos READ xPos WRITE setXPos);
    Q_PROPERTY(float yPos READ yPos WRITE setYPos);
    Q_PROPERTY(float zPos READ zPos WRITE setZPos);

    Q_PROPERTY(float xLookAt READ xLookAt WRITE setXLookAt);
    Q_PROPERTY(float yLookAt READ yLookAt WRITE setYLookAt);
    Q_PROPERTY(float zLookAt READ zLookAt WRITE setZLookAt);

    Q_PROPERTY(float nearClipDistance READ nearClipDistance WRITE setNearClipDistance);

    public:
        OCamera();

    ObjectType type() {
        return CAMERA;
    }

    virtual QString model() const {
        return id();
    }

    float xPos() const;

    void setXPos(float value);

    float yPos() const;

    void setYPos(float value);

    float zPos() const;

    void setZPos(float value);

    Q_INVOKABLE void applyPos();


    float xLookAt() const;

    void setXLookAt(float value);

    float yLookAt() const;

    void setYLookAt(float value);

    float zLookAt() const;

    void setZLookAt(float value);

    Q_INVOKABLE void applyLookAt();


    float nearClipDistance() const;

    void setNearClipDistance(float value);

    void setNativeCamera(Ogre::Camera* nativeCamera);
    Ogre::Camera* getNativeCamera();

    protected:

        float m_xPos;
        float m_yPos;
        float m_zPos;

        float m_xLookAt;
        float m_yLookAt;
        float m_zLookAt;

        Ogre::Camera* m_camera;
};

#endif // OCAMERA_H
